/*
 * charger-ss805x.h
 *
 * charger driver.
 *
 * Copyright (C) 2024 Sinh Micro, Inc.
 * Subject to the GNU Public License, version 2.
 *
 * Author: lixiang<lixiang@sinhmicro.com>
 * 
 * Encoding format: GB2312
 * Version: v1.2.2
 * Date: 2024-11-05
 */
 
#ifndef _CHARGER_SS805X_H_
#define _CHARGER_SS805X_H_

#define CHARGER_ENABLE()        (CHGCON4 |= 0x01)
#define CHARGER_DISABLE()       (CHGCON4 &= 0xFE)
#define CHARGER_IS_ENABLE()     (CHGCON4 & 0x01)
#define CHARGER_IS_CHGON()      (CHGSTAT & 0x02)
#define CHARGER_IS_TIMEOUT()    (CHGSTAT & 0x04)
#define CHARGER_IS_END()        ((CHGSTAT & 0x01) || CHARGER_IS_TIMEOUT())

#endif